home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_ambboulder.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  67 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_AmbBoulder.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.     message     pulse
  14.  
  15.     thing        soundPos0        nolink
  16.     thing        soundPos1        nolink
  17.     thing        soundPos2        nolink
  18.     thing        soundPos3        nolink
  19.     thing        soundPos4        nolink
  20.     thing        soundPos5        nolink
  21.     
  22.     sector      start_Amb1      linkID=1
  23.     
  24.     sector      stop_Amb1       linkID=0
  25.  
  26.     sound        ambient0=gen_cave_a1.wav   local
  27.     sound        ambient1=gen_cave_a2.wav   local
  28.     sound        ambient2=gen_cave_a3.wav   local
  29.     sound        ambient3=gen_cave_a4.wav   local
  30.     sound        ambient4=gen_cave_a5.wav   local
  31.     sound        ambient5=gen_cave_a6.wav   local
  32.     
  33.     int         soundsOn=0  local
  34.     
  35. end
  36.  
  37. # ========================================================================================
  38.  
  39. code
  40.  
  41. entered:
  42.  
  43.     if((GetSenderID() == 1) && (soundsOn == 0))
  44.     {
  45.         soundsOn = 1;
  46.         SetPulse(2.0);
  47.     }
  48.     
  49.     if(GetSenderID() == 0)
  50.     {
  51.         soundsOn = 0;
  52.         SetPulse(0.0);
  53.     }
  54.     
  55.     return;
  56.  
  57. # ========================================================================================
  58.  
  59. pulse:
  60.  
  61.     PlaySoundThing(ambient0[RandBetween(0, 5)], soundPos0[RandBetween(0, 3)], 1.0, 10, 20, 0);
  62.     return;
  63.  
  64. # ========================================================================================
  65.  
  66. end
  67.